home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / xunit.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  50 lines

  1. XUNIT - the reverse of UBASE for the HP48sx 
  2. From: Lutz Vieweg (lv@muffel.hotb.sub.org) 
  3. Newsgroups: comp.sources.hp48 
  4. Date: 15 Sep 91 21:43:24 GMT 
  5.  
  6. [Note: This includes self-modifying machine language!  DO NOT EXECUTE FROM 
  7.  A LIBRARY OR FROM A WRITE-PROTECTED RAM CARD!  -jkh-] 
  8.  
  9. When HP implemented the unit-calculation routines in their 48sx, they forgot a 
  10. very often requested function - the inverse function to UBASE. 
  11.  
  12. If you calculate with units, you will face a monsterous term after a while, 
  13. because the 48sx does not "shorten" the unit-fractions. 
  14.  
  15. This program fills the gap. You may type e.g. 
  16.  
  17. Your input               Result 
  18. ---------------------------------------------------- 
  19. 2.34_F/V             1:                   2.34_nF/mV 
  20. UBASE                1: .00000234_A^3*s^7/(kg^2*m^4) 
  21. XUNIT                1:                .00000234_F/V 
  22.  
  23. I hope you can see the meaning of XUNIT. 
  24.  
  25. XUNIT is a directory, which consists of the following: 
  26.  
  27. XUNIT      The main program. Uses XU.L, XU.A, U->A and ARRSUM 
  28.  
  29. XU.L       Is a list of your favourite units. Edit this list, if 
  30.             you want to, then call XL->A to create XU.A out of the 
  31.             list. XUNIT will only try to use the units in this list. 
  32.  
  33. XL->A      Creates the XU.A list from the XU.L list. This has to be 
  34.             done any time you change XU.L 
  35.  
  36. U->A       A subroutine that creates an array from an unit-object 
  37.             representing the exponents of the basic units. 
  38.             NOTICE: This one uses self-modifying ML. Do not store 
  39.             this one into protected RAM or libraries! 
  40.  
  41. ARRSUM     Simply does ABS with any member of an array. 
  42.  
  43. XU.A       is used by XUNIT for internal use. 
  44.  
  45.  
  46. This PGM is public domain. I would like to see any improvements, especcially 
  47. speed-ups. 
  48.  
  49. cu, Lutz Vieweg. 
  50.